import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { StudentEvaluateComponent } from './student-evaluate/student-evaluate.component';
import { DepartmentEvaluateComponent } from './department-evaluate/department-evaluate.component';
import { SupervisionEvaluateComponent } from './supervision-evaluate/supervision-evaluate.component';
import { TechAllEvaluateComponent } from './tech-all-evaluate/tech-all-evaluate.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {ShareModule} from '../../share/share.module';
import {RouterModule, Routes} from '@angular/router';
import {UMeditorModule} from 'ngx-umeditor';
import {EvaluateStatisticsComponent} from './evaluate-statistics.component';
import {LoginActivate} from '../../core/auth/login.activate';

const routes: Routes = [
  {
    path: '',
    component: EvaluateStatisticsComponent,
    children: [
      {
        path: 'student-evaluate',
        component: StudentEvaluateComponent,
        data: {
          breadcrumb: '学生评价统计'
        },
        canActivate: [LoginActivate]
      },
      {
        path: 'department-evaluate',
        component: DepartmentEvaluateComponent,
        data: {
          breadcrumb: '系部评价统计'
        },
        canActivate: [LoginActivate]
      },
      {
        path: 'supervision-evaluate',
        component: SupervisionEvaluateComponent,
        data: {
          breadcrumb: '督导评价统计'
        }
      },
      {
        path: 'tech-all-evaluate',
        component: TechAllEvaluateComponent,
        data: {
          breadcrumb: '教学综合评价统计'
        }
      },
      {
        path: '', redirectTo: 'student-evaluate', pathMatch: 'full'
      },
      {
        path: '**',
        component: StudentEvaluateComponent
      }
    ]
  }
];

@NgModule({
  declarations: [
    EvaluateStatisticsComponent,
    StudentEvaluateComponent,
    DepartmentEvaluateComponent,
    SupervisionEvaluateComponent,
    TechAllEvaluateComponent],
  imports: [
    CommonModule,
    NgZorroAntdModule,
    FormsModule,
    ReactiveFormsModule,
    ShareModule,
    RouterModule.forChild(routes),
    UMeditorModule.forRoot(),
  ]
})
export class EvaluateStatisticsModule { }
